package org.zkdemo.actors;

import org.springframework.context.ApplicationContext;

import akka.japi.Creator;

public class CoreCreator implements Creator<Core>
{
    private static final long  serialVersionUID = 1L;
    
    private ApplicationContext applicationContext;
    private int                sessionTimeout;
    private int                port;
    private String             host;
    
    public CoreCreator(ApplicationContext applicationContext)
    {
        this.applicationContext = applicationContext;
    }
    
    public CoreCreator(ApplicationContext applicationContext, int sessionTimeout, int port, String host)
    {
        super();
        this.applicationContext = applicationContext;
        this.sessionTimeout = sessionTimeout;
        this.port = port;
        this.host = host;
    }
    
    @Override
    public Core create() throws Exception
    {
        return new Core(applicationContext, host, port, sessionTimeout);
    }
}
